<%layout("/common/layout.html"){%>
<div class="col-md-8">

    <ol class="breadcrumb">
        <li><a href="${base}/">一起</a></li>
        <li class="active">我的信息</li>
    </ol>

    <h3 class="docs-header">个人信息</h3>

    <div class="jumbotron">

        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <a href="#" id="user_head" class="thumbnail">
                    <img src="${base}/img/face.png" alt="我是头像">
                </a>
            </div>
        </div>

        <div class="row">
            <div class="text-center">
                <h2 id="user_name">${user0.name!}</h2>

                <p class="text-info">注册时间: ${printTime(user0.time)}</p>
            </div>
            <div class="alert alert-info text-center" role="alert">${user0.feeling!}</div>

            <%if(session.user.id==user0.id){%>

            <div class="text-center">
                <a type="button" href="${base}/user/editInfo" class="btn btn-primary btn-lg">
                    编辑信息>>
                </a>
            </div>


            <%}else{%>

            <div class="text-center">
                <button type="button" id="send_launch" class="btn btn-primary btn-lg" data-toggle="modal"
                        data-target="#myModal">
                    私信
                </button>
            </div>


            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                 aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel">发送私信</h4>
                        </div>
                        <div class="modal-body">
                            <div class="form-group">
                                <textarea rows="3" id="text_send" class="form-control" placeholder="你的内容"></textarea>
                                <input id="user_id" type="hidden" value="${user0.id}">
                                <p id="send_loading" hidden="hidden">发送中</p>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" id="send_cancel" class="btn btn-default" data-dismiss="modal">取消
                            </button>
                            <button type="button" id="send_msg" class="btn btn-primary">发送</button>
                        </div>
                    </div>
                </div>
            </div>
            <%}%>
        </div>
    </div>
</div>

<%include("/common/side_bar.html"){}%>

<%}%>